<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="common_css :: commonHeader('科目管理')"></head>
<body>


<form method="post" id="tabfrom1">
    <div style="padding:2px" class="easyui-panel" title="数据查询">
        <table class="form-table">
            <tr>
                <td align="right" width="10%">核算方案：</td>
                <td align="left">
                    <input id="projectId" class="easyui-combobox" editable="false"
                           data-options="valueField:'id',textField:'name',prompt:'==请选择==',panelHeight:'auto'"/>
                </td>
                <td align="right" width="10%">资产分类：</td>
                <td align="left">
                    <input id="selAssetsType" class="easyui-combobox"
                           data-options="valueField:'value',textField:'showmsg',prompt:'==请选择==',panelHeight:'auto'"/>
                </td>
                <td align="right" width="10%">核算数量：</td>
                <td align="left">
                    <input id="selAmount" editable="false"
                           class="easyui-combobox" data-options="prompt:'==请选择==',panelHeight:'auto', valueField: 'label', textField: 'value',
                                    data: [{ label: '',  value: '==全部==' },{ label: '1',  value: '是' },{ label: '2', value: '否'}]"/>
                </td>
            </tr>
        </table>
    </div>
    <br>
</form>


<div style="width: 100%" data-options="region:'west',split:true,border:true,title:'菜单树'">
    <div style="margin-left: 50px;">
        <input id="ss" class="easyui-searchbox" style="width:200px"
               data-options="prompt:'搜 索'"/>
        <ul id="treeContent" class="easyui-tree"></ul>
        <div id="nav" class="easyui-menu" style="width:120px;">
            <shiro:hasPermission name="finance:subject:add">
                <div id="1" data-options="iconCls:'icon-add'">添加</div>
            </shiro:hasPermission>
            <shiro:hasPermission name="finance:subject:edit">
                <div id="2" data-options="iconCls:'icon-edit'">修改</div>
            </shiro:hasPermission>
            <shiro:hasPermission name="finance:subject:del">
                <div id="3" data-options="iconCls:'icon-cancel'">移除</div>
            </shiro:hasPermission>
        </div>
    </div>
</div>

<div id="dg"></div>

<div id="dlg" class="easyui-dialog" style="width:900px;height:510px"
     closed="true" modal="true" maximizable="true" resizable="true">
    <form id="myform" method="post">
        <div style="padding:20px">
            <table cellpadding="2px" cellspacing="0" class="form-table">
                <tr>
                    <td>科目编码：</td>
                    <td>
                        <input id="code" name="code" class="easyui-validatebox" style="width: 400px;"
                               data-options="required:true" validType="checkCode['codeFirst','科目代码已经存在，请更换！']"
                               missingMessage="请维护主条目编码"/>
                        <input type="hidden" name="id" id="subjectId"/>
                        <input type="hidden" class="textbox" name="codeFirst" id="codeFirst"/><!--之前的-->
                    </td>
                </tr>
                <tr>
                    <td>科目名称：</td>
                    <td>
                        <input id="name" name="name" style="width: 400px;" class="easyui-validatebox"
                               data-options="required:true" missingMessage="请维护主条目编码"/>
                    </td>
                </tr>
                <tr>
                    <td>上级科目：</td>
                    <td>
                        <input id="parentId" name="parentId" class="easyui-combotree" style="width: 400px;"
                               data-options="required:true,prompt:'==请选择==',panelHeight:'150px',panelWidth:'300px'"
                               validType="comtreeValidate['parentId','请维护主条目编码']"
                               missingMessage="请维护主条目编码"/>
                    </td>
                </tr>
                <tr>
                    <td>借贷方向：</td>
                    <td>
                        <input id="drandcr" name="drandcr" editable="false"
                               class="easyui-combobox" data-options="prompt:'==请选择==',panelHeight:'auto', valueField: 'label', textField: 'value',
                                    data: [{ label: 'DR',  value: '借' },{ label: 'CR', value: '贷'}]"/>
                    </td>
                    <td>资产分类：</td>
                    <td>
                        <input id="assetsType" name="assetsType" class="easyui-combobox"
                               data-options="required:true,valueField:'value',textField:'showmsg',prompt:'==请选择==',panelHeight:'auto'"
                               missingMessage="请维护资产分类" validType="comboxValidate['assetsType','请维护资产分类']"/>
                    </td>
                </tr>
                <tr>
                    <td>核算数量：</td>
                    <td>
                        <input id="amount" name="amount" editable="false"
                               class="easyui-combobox" data-options="prompt:'==请选择==',panelHeight:'auto', valueField: 'label', textField: 'value',
                                    data: [{ label: '1',  value: '是' },{ label: '2', value: '否'}]"/>
                    </td>
                    <td>明细科目：</td>
                    <td>
                        <input id="detailed" name="detailed" editable="false"
                               class="easyui-combobox" data-options="prompt:'==请选择==',panelHeight:'auto', valueField: 'label', textField: 'value',
                                       data: [{ label: '1',  value: '是' },{ label: '2', value: '否'}]"/>
                    </td>
                </tr>
                <tr>
                    <td>核算类型：</td>
                    <td>
                        <input id="adjustCode" name="adjustCode" class="easyui-combobox"
                               data-options="required:false,valueField:'value',textField:'showmsg',prompt:'==请选择==',panelHeight:'auto'"
                               missingMessage="请维护科目核算类型" validType="comboxValidate['adjustCode','请维护科目核算类型']"/>
                    </td>
                </tr>
            </table>
            <br>
        </div>

        <div id="divAuxilary" style="padding:20px">
            <div style="height: 20px; background: #e0ecff">科目辅助项目信息：</div>
            <br>
            <table id="auxilary" cellpadding="2px" cellspacing="0" class="form-table">
            </table>
        </div>
    </form>
</div>

<div th:include="common_js :: commJS"></div>
<script type="text/javascript"
        th:src="@{/js/finance/subject.js}"></script>
</body>
</html>
